#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>

int main()
{
    printf("I am runing ...\n");
    pid_t id = fork();
    if(id==0)   //child
    {
        while(1)
        {
            printf("I am child process...\n");
            sleep(1);
        }
    }
    else if(id > 0) //parent
    {
        while(1)
        {
            printf("I am parent process...\n");
            sleep(1);
        }
    }
    else {  //fork error

    }
    return 0;
}
